package panda.rmi.client.impl;

import java.sql.SQLException;
import java.sql.Statement;

import panda.rmi.client.ConnectionAdapter;
import panda.rmi.server.ServerConnection;
import panda.rmi.server.ServerStatement;

public class PandaConnection extends ConnectionAdapter {
	private ServerConnection conn;
	
	PandaConnection(ServerConnection conn) {
		this.conn = conn;
	}

	public Statement createStatement() throws SQLException{
		try {
			ServerStatement stm = conn.createStatement();
			return new PandaStatement(stm);
		}
		catch (Exception e) {
			throw new SQLException(e);
		}
	}
}
